public class TaxiFactory {
    public static Taxi createNormalTaxi() {
        int nightBasePrice = 13;
        int basePrice = 11;
        double nightUnitPrice = 2.4;
        double unitPrice = 1.6;
        int baseDistance = 3;

        CompositeTaxiCharge nightCharge = new CompositeTaxiCharge();
        nightCharge.addTaxiCharge(new FixPriceTaxiCharge(nightBasePrice));
        nightCharge.addTaxiCharge(new ExtraPriceTaxiCharge(baseDistance, nightUnitPrice));

        CompositeTaxiCharge dayTimeCharge = new CompositeTaxiCharge();
        dayTimeCharge.addTaxiCharge(new FixPriceTaxiCharge(basePrice));
        dayTimeCharge.addTaxiCharge(new ExtraPriceTaxiCharge(baseDistance, unitPrice));

        return new Taxi(new TaxiMeter(nightCharge, dayTimeCharge));
    }

    public static Taxi createShanghaiInnerTaxi() {
        int nightBasePrice = 18;
        int basePrice = 14;
        int nightUnitPrice = 3;
        double nightPriceAfter10 = 4.7;
        double unitPrice = 2.5;
        double unitPriceAfter10 = 3.5;
        int baseDistance = 3;

        CompositeTaxiCharge nightCharge = new CompositeTaxiCharge();
        nightCharge.addTaxiCharge(new FixPriceTaxiCharge(nightBasePrice));
        nightCharge.addTaxiCharge(new ExtraPriceTaxiCharge(baseDistance, nightUnitPrice));
        nightCharge.addTaxiCharge(new ExtraPriceTaxiCharge(10, nightPriceAfter10 - nightUnitPrice));


        CompositeTaxiCharge dayTimeCharge = new CompositeTaxiCharge();
        dayTimeCharge.addTaxiCharge(new FixPriceTaxiCharge(basePrice));
        dayTimeCharge.addTaxiCharge(new ExtraPriceTaxiCharge(baseDistance, unitPrice));
        dayTimeCharge.addTaxiCharge(new ExtraPriceTaxiCharge(10, unitPriceAfter10 - unitPrice));

        return new Taxi(new TaxiMeter(nightCharge, dayTimeCharge));
    }

    public static Taxi createShanghaiOuterRingTaxi() {
        int nightBasePrice = 18;
        int basePrice = 14;
        int nightUnitPrice = 3;
        double unitPrice = 2.5;
        int baseDistance = 3;

        CompositeTaxiCharge nightCharge = new CompositeTaxiCharge();
        nightCharge.addTaxiCharge(new FixPriceTaxiCharge(nightBasePrice));
        nightCharge.addTaxiCharge(new ExtraPriceTaxiCharge(baseDistance, nightUnitPrice));


        CompositeTaxiCharge dayTimeCharge = new CompositeTaxiCharge();
        dayTimeCharge.addTaxiCharge(new FixPriceTaxiCharge(basePrice));
        dayTimeCharge.addTaxiCharge(new ExtraPriceTaxiCharge(baseDistance, unitPrice));

        return new Taxi(new TaxiMeter(nightCharge, dayTimeCharge));
    }
}
